package org.sanmao.wyj.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.sanmao.wyj.domain.Cashout;
import org.sanmao.wyj.domain.Worker;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface WorkerService extends IService<Worker> {
    IPage<Worker> findWorkersPage(int currentPage, int pageSize);
    String login(Worker worker);
    List<Worker> findAllWorkers();
    Worker findWorkerById(int id);
    Boolean saveWorker(Worker worker);
    Boolean updateWorker(Worker worker);
    Boolean deleteWorkerById(int id);
    IPage<Worker> findWorkersByName(String name,int currentPage,int pageSize);
    Boolean cashOut(Cashout cash, HttpServletRequest request);
    Boolean findPassword(String username, String idcard, String password);
    Worker findMe(HttpServletRequest request);
    Boolean updateWorker(Worker worker, HttpServletRequest request);
}
